<?php
/**
 * Created by PhpStorm.
 * User: g
 * Date: 2017/4/27
 * Time: 16:54
 */

namespace app\front\controller;


class Income extends Home
{

    public function index(){
        //入金列表
        $user = db("AccountRegistration")->where("id",$this->userId)->find();
        $records = db("account_capital")->where("catid",1)->where("username",$user["username"])->order("createdate desc")->paginate(15);
        $this->assign("records",$records);
        return $this->fetch();
    }
    public function inmoney(){
        //在线入金
        if(IS_POST){

        }else{
            $record = db("account_registration")->where("id",$this->userId)->find();
            $payments = db("pay_interface")->where("state","1")->select();
            $this->assign("payments",$payments);
            $this->assign("record",$record);
            return $this->fetch();
        }

    }

}